<?php include_once 'activitycontroller.php' ?>
<?php include_once 'jobcontroller.php' ?>
<?php include_once 'usercontroller.php' ?>
<div id="cleft">
    <div id="logo" style="">
        <div>
            <?php if(isset($_COOKIE["username"])){ ?>
            <div style="float: left;">
                <img class="img-border" src="data/avatar/<?php echo $tvs[0]["avatar"] ?>" width="45px" height="45px" alt="default.png"/>
            </div>
            <div style="float:left;width:110px;word-wrap:break-word;padding-left:3px;">
                <b><a class="link" style="padding-left:0px;color:#204eb7;font-size: 1em" href="member.php?uid=<?php echo $tvs[0]["id"] ?>"><?php echo $tvs[0]["fullname"] ?></a></b>                
                <br/>
                <a style="font-size: .8em" class="link" href="edituser.php">Sửa thông tin cá nhân</a>
            </div>
            <?php } ?>
        </div>
        <div style="clear: both"></div>
    </div>
    <div class="menu-left">
        <h3>Danh mục 52PM1</h3>
        <ul>
            <li style="background: url('Images/icon/news.png') no-repeat 2px center;"><a href="index.php">Bảng tin 52PM1</a></li>
            <li style="background: url('Images/icon/class.png') no-repeat 4px center;"><a href="class.php">Giới thiệu lớp</a></li>
            <li style="background: url('Images/icon/member.png') no-repeat 4px center;"><a href="member.php">Danh sách thành viên</a></li>
<!--            <li style="background: url('Images/icon/bankhoan.png') no-repeat 4px center;"><a href="bk.php">Những băn khoăn trăn trở</a></li>-->
            <li style="background: url('Images/icon/beer.png') no-repeat 2px center;"><a href="tour.php">Tin tức nhậu nhẹt & du lịch</a></li>
            <li style="background: url('Images/icon/job.png') no-repeat 2px center;"><a href="vieclam.php">Giới thiệu việc làm</a></li>
            <li style="background: url('Images/icon/album.png') no-repeat 2px center;"><a href="album.php">Album ảnh 52pm1</a></li>
            <li style="background: url('Images/icon/cal.png') no-repeat 2px center;"><a href="sukien.php">Sự kiện</a></li>
        </ul>
        <h3>Tin nhậu & du lịch</h3>
        <ul class="post-nav">
            <?php foreach($list_act_left as $r){ ?>
            <li>
                <div>
                    <div style="float: left;">
                        <img class="img-border" src="data/avatar/<?php echo $r["avatar"] ?>" width="40px" height="40px" alt="default.png"/>
                    </div>
                    <div style="float:left;width:110px;word-wrap:break-word;padding-left:3px;">
                        <b class="tipsy" title="<?php echo $r["chude"] ?>"><a class="link" style="padding-left:0px;color:#204eb7;font-size: 1.1em" href="tour.php?aid=<?php echo $r[0] ?>"><?php echo Util::substr($r["chude"],30) ?></a></b>
                        <br/>
                        <br/>
                        <p>
                            <?php $date = date("d/m/Y H:i:s",  strtotime("{$r["ngaybatdau"]}")) ?>
                            Đăng lúc <?php echo $date ?>
                        </p>
                    </div>
                </div>
                <div style="clear: both"></div>
            </li>
            <?php } ?>            
        </ul>
        <h3>Tin tức việc làm</h3>
        <ul class="post-nav">
            <?php foreach($list_job_left as $l){ ?>
            <li>
                <div>
                    <div style="float: left;">
                        <img class="img-border" src="data/avatar/<?php echo $l["avatar"] ?>" width="40px" height="40px" alt="default.png"/>
                    </div>
                    <div style="float:left;width:110px;word-wrap:break-word;padding-left:3px;">
                        <b class="tipsy" title="<?php echo $l["tenvieclam"] ?>"><a class="link" style="padding-left:0px;color:#204eb7;font-size: 1.1em" href="chitietvieclam.php?id=<?php echo $l[0] ?>"><?php echo Util::substr($l["tenvieclam"], 30) ?></a></b>
                        <br/>
                        <br/>
                        <p>
                            <?php $date = date("d/m/Y H:i:s",  strtotime("{$l["ngaydang"]}")) ?>
                            Đăng lúc <?php echo $date ?>
                        </p>
                    </div>
                </div>
                <div style="clear: both"></div>
            </li>
            <?php } ?>
        </ul>        
    </div>
</div>